public class CustomerTest {
    public static void main(String[] args) {
//        Customer c = new Customer();
//        c.eat();
//        Customer[][] c = new Customer[5][3];
//        System.out.println(c[0][0]);
//        int[][] q = new int[5][4];
//        System.out.println(q[0]);
        String[] s = new String[2];
        s[0] = "呵呵呵";
        System.out.println(s[0]);
        Customer[] c = new Customer[3];
        c[0] = new Customer();
        c[0].name = "Tom";
        System.out.println(c[0].name);

        Phone p1 = new Phone();
        p1.playGame();
        p1.sendEmail();
        //匿名对象
        new Phone().sendEmail();
    }
}

class Customer {
    String name;
    int age;
    boolean isMale;

    public void eat() {
        System.out.println("客户吃饭");
        sleep(8);
    }

    public void sleep(int hour) {
        System.out.println("客户休息了" + hour + "小时");
    }

    public String getName() {
        return name;
    }

    public String getNation(String nation) {
        String info = "我的国籍是:" + nation + "呵呵呵呵";
        return info;
    }
}

class Phone {
    double price;

    public void sendEmail() {
        System.out.println("手机可以发邮件");
    }

    public void playGame() {
        System.out.println("手机可以玩游戏");
    }
}